 <%@page import="java.awt.Button"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="doantotnghiep.model.Customer"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@page import="java.util.ArrayList"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/table.css" />" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/button.css" />" />
<!-- 
<script	src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->

<title>Quản lý khách hàng</title>

</head>
<body>
	<br>
	<br>
	<br>
	<div class="tagline_right">
		<fieldset>
			<legend>Tìm kiếm thông tin khách hàng</legend>
			<input type="text" value="Tìm kiếm thông tin khách hàng"
				id="customerkeyword"
				onfocus="if (this.value == 'Tìm kiếm thông tin khách hàng') {this.value = '';}"
				onblur="if (this.value == '') {this.value = 'Tìm kiếm thông tin khách hàng';}" />
			<input type="button"  id="customersearch" value="Search" />
		</fieldset>
	</div>
	<div id="viewcustomerdiv"  align="center">
			<h1 style="color: blue;">QUẢN LÝ KHÁCH HÀNG</h1>
				<div >
					<table class="table1" id="customertable">
						<tr>
							<th scope="col" abbr="Starter">Mã khách hàng</th>
							<th scope="col" abbr="Starter">Tên khách hàng</th>
							<th scope="col" abbr="Starter">Địa chỉ</th>
							<th scope="col" abbr="Starter">Điện thoại</th>
							<th scope="col" abbr="Starter"></th>
							<th scope="col" abbr="Starter"></th>
						</tr>
				
							<c:forEach items="${listAllCustomer.customerDTOs}" var="customer"
								varStatus="status">
								<tr class="<c:if test="${status.count % 2 == 0}">even</c:if>">
									<td>${customer.id}</td>
									<td>${customer.fullName}</td>
									<td>${customer.address}</td>
									<td>${customer.telNumber}</td>
									<td>
										<a id="editcustomer"  
										href="#" onclick="updateCustomer(${customer.id})"><img src="<c:url value="/resources/images/edit-icon.png"/>" />
									</a></td>
									<td>
										<a id="deletestaff"
										href="#" onclick="deleteCustomer(${customer.id})"><img src="<c:url value="/resources/images/delete-icon1.png"/>" /> </a></td>
								</tr>
							</c:forEach>
					</table>
					<div id="customerpaging"></div>
					<script type="text/javascript">
						var pager = new Pager('customertable', 7);
						pager.init();
						pager.showPageNav('pager', 'customerpaging');
						pager.showPage(1);
					</script>
					<a href="#"><input class="button"
									id="addcustomer" type="button" value="Thêm"></a> 
				</div>
			</div>
</body>
</html>